package com.dly.blog.plugin;

import com.dly.blog.domain.File;
import com.dly.blog.enums.UploadType;
import org.springframework.plugin.core.Plugin;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: DaiLiYu
 * @Date: 2023/7/12 22:13
 */
public interface UploadFilePlugin extends Plugin<UploadType> {

    /**
     * 上传永久文件
     * @param fileInfo
     * @param filePath
     * @param multipartFile
     * @return
     */
    File uploadFile(File fileInfo, String filePath, MultipartFile multipartFile);

    /**
     * 有效期的文件
     * @param fileInfo
     * @param filePath
     * @param multipartFile
     * @return
     */
    File uploadFileTerm(File fileInfo, String filePath, MultipartFile multipartFile);
}
